package org.bocs.controller;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.bocs.service.BannerService;
import org.bocs.service.HomeService;
import org.bocs.untils.ResultVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Tag(name = "/love-snow", description = "首页接口")
@RequestMapping("/love-snow")
public class HomeController {

    @Resource
    private HomeService homeService;
    @Resource
    private BannerService bannerService;

    @GetMapping("/banner")
    @Operation(summary = "获取轮播图接口")
    public ResultVo getBannerList() {
        return bannerService.getBannerList();
    }

    @GetMapping("/category")
    @Operation(summary = "获取类别导航接口")
    public ResultVo getCategoryALlList(){
        ResultVo categoryList = homeService.getCategoryList(0);
        return categoryList;
    }
}
